<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>添加课程</title>
    </head>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/css/course/courseList-add.css"/>
    <script src="/js/course/courseList-add.js"></script>
    <body>
    <div style="width: 100%">
        <div>
            <div>
                <div class="layui-card headerCenter">
                    <div class="layui-card-header backColor">
                        课程列表
                        <div class="btnRight" style="margin-bottom: 10px">
                            <button onclick="backOff()" type="button" class="layui-btn layui-btn layui-btn-sm">
                                <i class="layui-icon layui-icon-return"></i>
                                返回
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="box">
            <form class="layui-form" lay-filter="form" id="addProduct">
                <div class="layui-form-item">
                    <label class="layui-form-label">课程分类：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="classification" required lay-verify="required" id="classification" placeholder="" disabled class="layui-input">
                        <a class="flo" href="javascript:findBookName()"><img src="/images/icon27.gif"/></a>
                    </div>
                </div>
                <div class="layui-form-item">
                    <span id="category" class="hide" style="margin-left: 24px">您当前选择的课程类别是：</span>
                </div>
                <input type="text" name="classId" required lay-verify="required" class="layui-input hide">
                <div class="layui-form-item">
                    <label class="layui-form-label">课程名称：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="courseName" required lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">课程价格：</label>
                    <div class="layui-input-inline">
                        <input name="courseNprice" required lay-verify="required"  class="layui-input" type="text">
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">课程介绍：</label>
                    <div class="layui-input-block">
                        <textarea name="courseIntro" required lay-verify="required" placeholder="请输入内容" class="layui-textarea" style="resize: none;"></textarea>
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">课程详情：</label>
                    <div class="layui-input-block">
                        <textarea name="courseInfo" required lay-verify="required" placeholder="请输入课程详情" class="layui-textarea" style="resize: none;"></textarea>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">上架/下架：</label>
                    <div class="layui-input-inline">
                        <input name="courseStatus" type="checkbox" lay-filter="kg" lay-skin="switch" lay-text="上架|下架">
                    </div>
                </div>

                <div class="layui-form-item">
                <label class="layui-form-label" style="width: 100px;">上传视频封面图</label>
                <div class="layui-input-inline" style="width: 300px">
                    <button type="button" class="layui-btn" id="imgUpload">上传图片</button>
                    <span><i style="color: red;">注</i>：只能上传一张图片</span>
                    <input type="text" name="url" class="layui-input hide">
                </div>
            </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">预览图：</label>
                    <div class="layui-input-inline">
                        <div style="border: 1px #D2D2D2 solid; width: 190px; height: 190px;">
                            <img src="" id="upload1Img" class="layui-upload-img" width="100%" height="100%"/>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label" style="width: 100px;">上传视频：</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <button type="button" class="layui-btn" id="videoUpload">上传课程视频</button>
                        <input type="text" name="courseUrl" class="layui-input hide">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">视频预览：</label>
                    <div class="layui-input-inline">
                        <div style="border: 1px #D2D2D2 solid; width: 290px; height: 190px;">
                            <video id="uploadVideo" src="" controls="controls" autoplay="autoplay" width="100%" height="100%">

                            </video>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" id="sub" lay-submit lay-filter="formDemo">完成，提交课程</button>
                        <button class="layui-btn" type="button" id="subUpload" style="display: none" >完成，提交课程</button>
                        <button class="layui-btn" type="button" id="Upload" style="display: none" >完成，提交课程</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    </body>
</html>